// OutputBar.h : header file
//
/////////////////////////////////////////////////////////////////////////////

#ifndef __OUTPUTBAR_H__
#define __OUTPUTBAR_H__

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "UWM.h"
#include "OTRACE.h"
#include "EditCtrlForFlatTab.h"
#include "Usuario.h"

class COutputList : public CEditCtrlForFlatTab
{
// Construction
public:
	COutputList();

// Attributes
protected:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(COutputList)
	virtual BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~COutputList();

	// Generated message map functions
protected:
	//{{AFX_MSG(COutputList)
	afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// COutputBar class
class _PROVIR_EXT_CLASS COutputBar : public CXTDockWindow
{
	DECLARE_DYNAMIC(COutputBar)

// Construction
public:
	COutputBar();
	BOOL CreateTabOutputWnd(COutputList& wndOutput, UINT nID, CString strList);

// Attributes
public:
	BOOL Create( CWnd* pParentWnd, LPCTSTR lpszCaption=NULL, 
		CSize size=CSize(200,100), DWORD dwStyle=CBRS_LEFT, DWORD dwBarStyle=CBRS_XT_DEFAULT/*CBAR_DEFAULT*/);	

	CString			m_strLocalName;
	int				m_cy;
	CXTFlatTabCtrl	m_flatTabCtrl;
	COutputList		m_DebugList;
	COutputList		m_TodosList;
	CArray<COutputList *, COutputList *> m_arrayUsuariosList;
	CFont			m_Font;

    CXTFlatComboBox     m_wndComboUsuarios;
	CEdit				m_wndEditMsg;
	CButton				m_wndButtonSend;

// Operations
public:
//	CString GetString(int nString);
//	void UpdateFont();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(COutputBar)
	protected:
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
	//}}AFX_VIRTUAL

// Implementation
public:
//	void SelectTabView(int nTab);
	virtual ~COutputBar();
    virtual void GetInsideRect(CRect &rect);
	void AddUsuario(CUsuario *pUsr);
	void ActivaUsuario(CUsuario *pUsr);
	void AddMsg(CUsuario *pUsr, CString strMsg);

// Generated message map functions
protected:
	//{{AFX_MSG(COutputBar)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnBorrar();
	afx_msg void OnEnviar();
	//}}AFX_MSG
#ifdef _DEBUG
	afx_msg LRESULT OnTrace(WPARAM wP, LPARAM lp);
#endif
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // __OUTPUTBAR_H__

